package com.qf.webmaster.feign;

import com.netflix.discovery.converters.Auto;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class SearchClientFallbackFactory implements FallbackFactory<SearchClient> {

    @Autowired
    private SearchClientFallback fallback;

    @Override
    public SearchClient create(Throwable throwable) {
        throwable.printStackTrace();
        return fallback;
    }
}
